package com.situ.web.entity;

public class Student extends Object{
	// 把所有学生共同的属性抽取出来，而且属性私有，这个过程就是封装发体现
	private Integer id;// int默认值：0  double默认值：0.0   引用数据类型（所有的类）默认值：null
	private String name;
	private Integer age;
	private String gender;
	
	public Student() {
		super();
	}

	public Student(int id, String name, int age, String gender) {
		super();
		this.id = id;
		this.name = name;
		this.age = age;
		this.gender = gender;
	}
	
	public Student(String name, Integer age, String gender) {
		super();
		this.name = name;
		this.age = age;
		this.gender = gender;
	}

	// 实例方法
	public void show() {
		System.out.println("Student.show()");
	}
	
	// 静态方法
	public static void print() {
		System.out.println("Student.print()");
	}

	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		// this.id里面的this代表的是当前对象
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", age=" + age + ", gender=" + gender + "]";
	}
	
	
	
}
